package com.zdlyh.runner;

import com.zdlyh.utils.RunTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class ViewCountRunner implements CommandLineRunner {

    @Autowired
    private RunTask runTask;

    // 启动任务
    @Override
    public void run(String... args) {
        runTask.updateViewCount();
    }
}
